package com.example.ordersystem.domain;


import java.io.File;
import java.io.Serializable;

/**
 * categoryNum 分类编号
 * num 菜品编号
 * name 菜品名称
 * cook 厨师编号
 * price 菜品单价
 * picture 菜品图片
 * description 菜品描述
 *
 */


public class Dish implements Serializable {

    public static final String PICTURE_PATH = "/DishPictures";


    private int categoryNum;


    private int num;


    private String name;


    private int price;


    private String picture;

    private String description;


    public Dish() {
        super();
    }


    public Dish(int categoryNum, int num, String name, int price, String picture, String description) {
        super();
        this.categoryNum = categoryNum;
        this.num = num;
        this.name = name;
        this.price = price;
        this.picture = picture;
        this.description = description;
    }

    public String getDisplayPicture() {
//        return "dishes" + File.separator + picture;
        return PICTURE_PATH.concat(File.separator).concat(picture);
    }

    public static String getPicturePath() {
        return PICTURE_PATH;
    }

    public int getCategoryNum() {
        return categoryNum;
    }

    public void setCategoryNum(int categoryNum) {
        this.categoryNum = categoryNum;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
